import service from '../utils/request'

//注册
export const register = (params:any) => {
    return service({
        url:'/api/user/register',
        method:'post',
        params
    })
}
//登录
export const login = (params:any) => {
    return service({
        url:'/api/user/login',
        method:'post',
        params
    })
}

//获取用户的男女比例
export const getGendersNum = () => {
    return service({
        url:'/api/user/search/genders',
        method:'get'
    })
}
//近七天用户注册数统计
export const getSevenNumber = () => {
    return service({
        url:'/api/user/search/seven',
        method:'get'
    })
}
//根据id修改个人信息
export const modifyUserInfoById = (params:any) => {
    return service({
        url:'/api/user/update',
        method:'post',
        params
    })
}
//根据分页条件和昵称以及排序查找所有用户
export const getUserByPageNicknameSort = (params:any) => {
    return service({
        url:'/api/user/search',
        method:'get',
        params
    })
}
//新增用户
export const addUser = (params:any) => {
    return service({
        url:'/api/user/add/one',
        method:'post',params
    })
}
//根据id删除用户
export const deleteUserById = (params:any) => {
    return service({
        url:'/api/user/delete',
        method:'post',
        params
    })
}
//根据id获取用户详情
export const getUserDetailById = (params:any) => {
    return service({
        url:'/api/user/search/id',
        method:'get',
        params
    })
}
//批量删除用户
export const deleteUserAmount = (params:any) => {
    return service({
        url:'/api/user/delete/amount',
        method:'post',
        params
    })
}